<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<style>
		#box{
			height: 150px;
			width: 150px;
			background-color: purple;
			margin: 100px;
		}
	</style>
	<body>
		<input type="button" id="btn" value="形变"/>
		<div id="box"></div>
	</body>
	<script>
		window.onload = function(){
			var a=0;
			$("btn").onclick=function(){
				a++;
				
				$("box").style.transform = "translate("+(a*50)+"px,"+(a*50)+"px) rotate("+(a*50)+"deg) scale("+(a*1.3)+")"
			}
			
		}
		
		
		
		
		function $(id){
			return typeof id ==="string"?document.getElementById(id):null
		}
	</script>
</html>
